public class TestPrime {
    public static void main(String[] args) {
        System.out.println(isPrime(97));
        System.out.println("---------------------------------------");
        System.out.println(sumPrime(10,100));
    }

    public static int sumPrime(int start,int end) {
        int sum = 0;
        for(int i=start;i<=end;i++) {
            if(isPrime(i)) {
                sum+=i;
            }
        }
        return sum;
    }

    public static void printPrime(int start,int end) {
        for(int i=start;i<=end;i++) {
            if(isPrime(i)) {
                System.out.println(i);
            }
        }
    }

    public static boolean isPrime(int n) {
        for(int i=2;i<n;i++) {
            if(n%i==0) {
                return false;
            }
        }
        return true;
    }
}
